import 'package:get/get.dart';
import '../modules/main/bindings/main_binding.dart';
import '../modules/main/pages/main_view.dart';
import '../modules/position/bindings/position_binding.dart';
import '../modules/position/pages/position_page.dart';
import '../modules/position/pages/add_buy_record_page.dart';
import '../modules/position/pages/add_sell_record_page.dart';
import '../modules/position/pages/edit_buy_record_page.dart';


class AppPages {
  static List<GetPage> getAllViews() {
    return
      [
        GetPage(
          name: '/main',
          page: () => MainView(),
          binding: MainBinding(),
        ),
        GetPage(
          name: '/position',
          page: () => PositionPage(),
          binding: PositionBinding(),
        ),
        GetPage(
          name: '/addBuyRecord',
          page: () => AddBuyRecordPage(),
          binding: PositionBinding(),
        ),
        GetPage(
          name: '/sellStock',
          page: () =>
              AddSellRecordPage(
                symbol: Get.arguments['symbol'],
                name: Get.arguments['name'],
                availableQuantity: Get.arguments['availableQuantity'],
              ),
          binding: PositionBinding(),
        ),
        GetPage(
          name: '/editBuyRecord',
          page: () => EditBuyRecordPage(recordId: Get.arguments),
          binding: PositionBinding(),
        ),
        // trade_history_page 是通过对话框展示的，不需要路由
      ];
  }
}